using Newtonsoft.Json;

namespace KL.Standard.Model.ViewModels.OutResult;

/// <summary>
/// 树形节点
/// </summary>
/// <typeparam name="T"></typeparam>
public class TreeNode<T>
{
    /// <summary>
    /// ID
    /// </summary>
    public T id { set; get; }
    /// <summary>
    /// 标签
    /// </summary>
    public string label { set; get; }
    /// <summary>
    /// 父ID
    /// </summary>
    [JsonIgnore]
    public T pID { set; get; }
    /// <summary>
    /// 全部排序
    /// </summary>
    [JsonIgnore]
    public string fullOrderSeq { set; get; }
    /// <summary>
    /// 子节点
    /// </summary>
    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public List<TreeNode<T>> children { set; get; }
}